<#include "header1.ftl"/>
<style>
    .list-group-item>.badge{
        display: none;
    }
</style>
<#include "header2.ftl"/>
<div class="main" style="margin-top:10px;margin-bottom: 10px">
    <div id="goodsCategoryDiv" style="margin-left: 2%;margin-top: 40px;font-size: 14px;width:240px;float: left"></div>
<div class="container">
<div class="col-md-12 col-sm-12">
    <ul class="breadcrumb" id="categoryName">
        <li><a href="javascript:void(0)" onclick="getGoods(0)">纪念品</a></li>
        <li class="active">${goods.cname!}</li>
    </ul>
    <div class="product-page">
        <div class="row">
            <div class="col-md-6 col-sm-6">
                <div class="product-main-image">
                    <img src="${goods.image!}" alt="Cool green dress with red bell" class="img-responsive"  style="width:100%;height: 433px">
                    <#if goods.tag == '1'><div class="sticker sticker-new" style="z-index: 1"></div></#if>
                </div>
                <div class="product-other-images">
                    <#list goods.imageList as image>
                        <a href="${image}" class="fancybox-button" rel="photos-lib"><img alt="Berry Lace Dress" src="${image}" style="width: 80px;height: 80px"></a>
                    </#list>
                </div>
            </div>
            <div class="col-md-6 col-sm-6">
                <h1>${goods.title!}</h1>
                <div class="price-availability-block clearfix">
                    <div class="price">
                        <#if goods.promotionDateFrom?? && goods.promotionDateTo?? && goods.promotionPrice?? && goods.promotionDateFrom?date lt .now?date && goods.promotionDateTo?date gt .now?date>
                            <strong><span>￥</span>${goods.promotionPrice!}</strong>
                            <em>￥<span>${goods.price!}</span></em>
                        <#else>
                            <strong><span>￥</span>${goods.price!}</strong>
                        </#if>
                    </div>
                </div>
                <div class="description">
                    <p>${goods.introduction!}</p>
                </div>
                <div class="product-page-options">
                  <div class="pull-left">
                    <label class="control-label">库存:</label>
                    <label class="control-label">${goods.num!}</label>
                  </div>
                </div>
                <div class="product-page-cart">
                    <div class="product-quantity">
                        <input id="product-quantity" limit=${goods.num!} type="text" value="1" readonly class="form-control input-sm">
                    </div>
                    <button class="btn btn-primary" type="button" onclick="addCartProduct('${goods.id}')">加入购物车</button>
                </div>
               <#-- <div class="review">
                    <input type="range" value="4" step="0.25" id="backing4">
                    <div class="rateit" data-rateit-backingfld="#backing4" data-rateit-resetable="false"  data-rateit-ispreset="true" data-rateit-min="0" data-rateit-max="5">
                    </div>
                    <a href="javascript:;">7 条评价</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:;">写评价</a>
                </div>-->

            </div>

            <div class="product-page-content">
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active"><a href="#Description" data-toggle="tab">商品描述</a></li>
                    <#--<li><a href="#Information" data-toggle="tab">商品信息</a></li>-->
                    <#--<li><a href="#Reviews" data-toggle="tab">评价</a></li>-->
                </ul>
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade in active" id="Description">
                        <p>
                            <#if goods.desc?? && goods.desc != ''>
                                ${goods.desc!}
                            <#else>
                                暂无商品描述
                            </#if>

                        </p>
                    </div>
                </div>
            </div>

            <#if goods.tag == '0'><div class="sticker sticker-sale"></div></#if>

        </div>
    </div>
</div>
</div>
</div>
<#include "footer1.ftl"/>
<script>
    $(function () {
        Layout.init();
        Layout.initOWL();
        Layout.initImageZoom();
        Layout.initTouchspin();
        Layout.initUniform();

        $('#goodsCategoryDiv').treeview({
            color: "#595f65",
            expandIcon: 'glyphicon glyphicon-chevron-right',
            collapseIcon: 'glyphicon glyphicon-chevron-down',
            data: '${treeNodes!}',
            showTags:true
        });
        $('#goodsCategoryDiv').on('nodeSelected', function(event, data) {
            cid = data.tags[0];
            window.location = "/goods?cid="+cid;
        });
    })



</script>
<#include "footer2.ftl"/>
